package br.com.sysponto.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;

/**
 * Servlet implementation class EditaColaboradorServlet
 */
public class EditaColaboradorServlet extends HttpServlet {

  
	public void doGet (HttpServletRequest request, HttpServletResponse response) {
		
	}
	
	public void goPost (HttpServletRequest request, HttpServletResponse response) {
		
		DiskFileItemFactory dfif = new DiskFileItemFactory();
		ServletFileUpload sfu = new ServletFileUpload(dfif);
		
	
		try {
		
		List item = sfu.parseRequest(request);
		
		
		FileItem nomeFI = (FileItem) item.get(1);
		String nome = "";
		
		if (!nomeFI.getString().equals("")) {
			nome = nomeFI.getString();
		}
		
		
		
		
		}catch (Exception ex) {
			
			throw new RuntimeException(ex);
			
		}
		
	}
}
